<?php
/**
 * Created by xun at 2020/5/20
 */

namespace app\controller;


use app\base\BaseController;
use app\base\CommandRunner;
use app\module\websocket\WebSocketAction;

class CommandController extends BaseController
{

    public function index()
    {
        CommandRunner::run($this->data['params']);
        $user = $this->currentUser();
        $this->sendMessage($user['fd'], [
            'action' => WebSocketAction::APP_COMMAND,
            'message' => 'operated complete!'
        ]);
    }

}